package org.gap.domain;

import java.io.Serializable;

import java.lang.StringBuilder;

import java.util.Calendar;
import java.util.Set;

import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import javax.xml.bind.annotation.*;

import javax.persistence.*;

/**
 */
@IdClass(org.gap.domain.GuichetsPK.class)
@Entity
@NamedQueries({
		@NamedQuery(name = "findAllGuichetss", query = "select myGuichets from Guichets myGuichets"),
		@NamedQuery(name = "findGuichetsByGuiAdressePrelevement", query = "select myGuichets from Guichets myGuichets where myGuichets.guiAdressePrelevement = ?1"),
		@NamedQuery(name = "findGuichetsByGuiChronoTrace", query = "select myGuichets from Guichets myGuichets where myGuichets.guiChronoTrace = ?1"),
		@NamedQuery(name = "findGuichetsByGuiCodeNouvEtablissement", query = "select myGuichets from Guichets myGuichets where myGuichets.guiCodeNouvEtablissement = ?1"),
		@NamedQuery(name = "findGuichetsByGuiCodeNouvEtablissementContaining", query = "select myGuichets from Guichets myGuichets where myGuichets.guiCodeNouvEtablissement like ?1"),
		@NamedQuery(name = "findGuichetsByGuiCodeSituation", query = "select myGuichets from Guichets myGuichets where myGuichets.guiCodeSituation = ?1"),
		@NamedQuery(name = "findGuichetsByGuiContactPrelevement", query = "select myGuichets from Guichets myGuichets where myGuichets.guiContactPrelevement = ?1"),
		@NamedQuery(name = "findGuichetsByGuiDebutValidite", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDebutValidite = ?1"),
		@NamedQuery(name = "findGuichetsByGuiDebutValiditeAfter", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDebutValidite > ?1"),
		@NamedQuery(name = "findGuichetsByGuiDebutValiditeBefore", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDebutValidite < ?1"),
		@NamedQuery(name = "findGuichetsByGuiDisparition", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDisparition = ?1"),
		@NamedQuery(name = "findGuichetsByGuiDisparitionAfter", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDisparition > ?1"),
		@NamedQuery(name = "findGuichetsByGuiDisparitionBefore", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDisparition < ?1"),
		@NamedQuery(name = "findGuichetsByGuiDomiciliation", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDomiciliation = ?1"),
		@NamedQuery(name = "findGuichetsByGuiDomiciliationContaining", query = "select myGuichets from Guichets myGuichets where myGuichets.guiDomiciliation like ?1"),
		@NamedQuery(name = "findGuichetsByGuiEtablissement", query = "select myGuichets from Guichets myGuichets where myGuichets.guiEtablissement = ?1"),
		@NamedQuery(name = "findGuichetsByGuiFinValidite", query = "select myGuichets from Guichets myGuichets where myGuichets.guiFinValidite = ?1"),
		@NamedQuery(name = "findGuichetsByGuiFinValiditeAfter", query = "select myGuichets from Guichets myGuichets where myGuichets.guiFinValidite > ?1"),
		@NamedQuery(name = "findGuichetsByGuiFinValiditeBefore", query = "select myGuichets from Guichets myGuichets where myGuichets.guiFinValidite < ?1"),
		@NamedQuery(name = "findGuichetsByGuiGuichet", query = "select myGuichets from Guichets myGuichets where myGuichets.guiGuichet = ?1"),
		@NamedQuery(name = "findGuichetsByGuiLocaliteCompensation1", query = "select myGuichets from Guichets myGuichets where myGuichets.guiLocaliteCompensation1 = ?1"),
		@NamedQuery(name = "findGuichetsByGuiLocaliteCompensation2", query = "select myGuichets from Guichets myGuichets where myGuichets.guiLocaliteCompensation2 = ?1"),
		@NamedQuery(name = "findGuichetsByGuiNatureGuichet", query = "select myGuichets from Guichets myGuichets where myGuichets.guiNatureGuichet = ?1"),
		@NamedQuery(name = "findGuichetsByGuiNatureGuichetContaining", query = "select myGuichets from Guichets myGuichets where myGuichets.guiNatureGuichet like ?1"),
		@NamedQuery(name = "findGuichetsByGuiNomGuichet", query = "select myGuichets from Guichets myGuichets where myGuichets.guiNomGuichet = ?1"),
		@NamedQuery(name = "findGuichetsByGuiNomGuichetContaining", query = "select myGuichets from Guichets myGuichets where myGuichets.guiNomGuichet like ?1"),
		@NamedQuery(name = "findGuichetsByGuiNouvGuichet", query = "select myGuichets from Guichets myGuichets where myGuichets.guiNouvGuichet = ?1"),
		@NamedQuery(name = "findGuichetsByGuiPays", query = "select myGuichets from Guichets myGuichets where myGuichets.guiPays = ?1"),
		@NamedQuery(name = "findGuichetsByGuiPaysContaining", query = "select myGuichets from Guichets myGuichets where myGuichets.guiPays like ?1"),
		@NamedQuery(name = "findGuichetsByGuiTiers", query = "select myGuichets from Guichets myGuichets where myGuichets.guiTiers = ?1"),
		@NamedQuery(name = "findGuichetsByPrimaryKey", query = "select myGuichets from Guichets myGuichets where myGuichets.guiEtablissement = ?1 and myGuichets.guiGuichet = ?2 and myGuichets.guiPays = ?3") })
@Table(schema = "GAP", name = "GUICHETS")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "GAP_v2/org/gap/domain", name = "Guichets")
public class Guichets implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */

	@Column(name = "GUI_ETABLISSEMENT", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	@XmlElement
	Integer guiEtablissement;
	/**
	 */

	@Column(name = "GUI_GUICHET", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	@XmlElement
	Integer guiGuichet;
	/**
	 */

	@Column(name = "GUI_PAYS", length = 3, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	@XmlElement
	String guiPays;
	/**
	 */

	@Column(name = "GUI_DOMICILIATION", length = 25, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String guiDomiciliation;
	/**
	 */

	@Column(name = "GUI_ADRESSE_PRELEVEMENT", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer guiAdressePrelevement;
	/**
	 */

	@Column(name = "GUI_CONTACT_PRELEVEMENT", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer guiContactPrelevement;
	/**
	 */

	@Column(name = "GUI_CHRONO_TRACE", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer guiChronoTrace;
	/**
	 */

	@Column(name = "GUI_NOM_GUICHET", length = 32)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String guiNomGuichet;
	/**
	 */

	@Column(name = "GUI_CODE_NOUV_ETABLISSEMENT", length = 5)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String guiCodeNouvEtablissement;
	/**
	 */

	@Column(name = "GUI_NOUV_GUICHET")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer guiNouvGuichet;
	/**
	 */

	@Column(name = "GUI_LOCALITE_COMPENSATION_1")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer guiLocaliteCompensation1;
	/**
	 */

	@Column(name = "GUI_LOCALITE_COMPENSATION_2")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer guiLocaliteCompensation2;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "GUI_DEBUT_VALIDITE")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Calendar guiDebutValidite;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "GUI_FIN_VALIDITE")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Calendar guiFinValidite;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "GUI_DISPARITION")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Calendar guiDisparition;
	/**
	 */

	@Column(name = "GUI_NATURE_GUICHET", length = 1)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String guiNatureGuichet;
	/**
	 */

	@Column(name = "GUI_CODE_SITUATION", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Boolean guiCodeSituation;
	/**
	 */

	@Column(name = "GUI_TIERS")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Integer guiTiers;

	/**
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "GUI_PAYS", referencedColumnName = "ETB_PAYS", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "GUI_ETABLISSEMENT", referencedColumnName = "ETB_ETABLISSEMENT", nullable = false, insertable = false, updatable = false) })
	@XmlTransient
	EtablissementsBancaires etablissementsBancaires;

	/**
	 */
	public void setGuiEtablissement(Integer guiEtablissement) {
		this.guiEtablissement = guiEtablissement;
	}

	/**
	 */
	public Integer getGuiEtablissement() {
		return this.guiEtablissement;
	}

	/**
	 */
	public void setGuiGuichet(Integer guiGuichet) {
		this.guiGuichet = guiGuichet;
	}

	/**
	 */
	public Integer getGuiGuichet() {
		return this.guiGuichet;
	}

	/**
	 */
	public void setGuiPays(String guiPays) {
		this.guiPays = guiPays;
	}

	/**
	 */
	public String getGuiPays() {
		return this.guiPays;
	}

	/**
	 */
	public void setGuiDomiciliation(String guiDomiciliation) {
		this.guiDomiciliation = guiDomiciliation;
	}

	/**
	 */
	public String getGuiDomiciliation() {
		return this.guiDomiciliation;
	}

	/**
	 */
	public void setGuiAdressePrelevement(Integer guiAdressePrelevement) {
		this.guiAdressePrelevement = guiAdressePrelevement;
	}

	/**
	 */
	public Integer getGuiAdressePrelevement() {
		return this.guiAdressePrelevement;
	}

	/**
	 */
	public void setGuiContactPrelevement(Integer guiContactPrelevement) {
		this.guiContactPrelevement = guiContactPrelevement;
	}

	/**
	 */
	public Integer getGuiContactPrelevement() {
		return this.guiContactPrelevement;
	}

	/**
	 */
	public void setGuiChronoTrace(Integer guiChronoTrace) {
		this.guiChronoTrace = guiChronoTrace;
	}

	/**
	 */
	public Integer getGuiChronoTrace() {
		return this.guiChronoTrace;
	}

	/**
	 */
	public void setGuiNomGuichet(String guiNomGuichet) {
		this.guiNomGuichet = guiNomGuichet;
	}

	/**
	 */
	public String getGuiNomGuichet() {
		return this.guiNomGuichet;
	}

	/**
	 */
	public void setGuiCodeNouvEtablissement(String guiCodeNouvEtablissement) {
		this.guiCodeNouvEtablissement = guiCodeNouvEtablissement;
	}

	/**
	 */
	public String getGuiCodeNouvEtablissement() {
		return this.guiCodeNouvEtablissement;
	}

	/**
	 */
	public void setGuiNouvGuichet(Integer guiNouvGuichet) {
		this.guiNouvGuichet = guiNouvGuichet;
	}

	/**
	 */
	public Integer getGuiNouvGuichet() {
		return this.guiNouvGuichet;
	}

	/**
	 */
	public void setGuiLocaliteCompensation1(Integer guiLocaliteCompensation1) {
		this.guiLocaliteCompensation1 = guiLocaliteCompensation1;
	}

	/**
	 */
	public Integer getGuiLocaliteCompensation1() {
		return this.guiLocaliteCompensation1;
	}

	/**
	 */
	public void setGuiLocaliteCompensation2(Integer guiLocaliteCompensation2) {
		this.guiLocaliteCompensation2 = guiLocaliteCompensation2;
	}

	/**
	 */
	public Integer getGuiLocaliteCompensation2() {
		return this.guiLocaliteCompensation2;
	}

	/**
	 */
	public void setGuiDebutValidite(Calendar guiDebutValidite) {
		this.guiDebutValidite = guiDebutValidite;
	}

	/**
	 */
	public Calendar getGuiDebutValidite() {
		return this.guiDebutValidite;
	}

	/**
	 */
	public void setGuiFinValidite(Calendar guiFinValidite) {
		this.guiFinValidite = guiFinValidite;
	}

	/**
	 */
	public Calendar getGuiFinValidite() {
		return this.guiFinValidite;
	}

	/**
	 */
	public void setGuiDisparition(Calendar guiDisparition) {
		this.guiDisparition = guiDisparition;
	}

	/**
	 */
	public Calendar getGuiDisparition() {
		return this.guiDisparition;
	}

	/**
	 */
	public void setGuiNatureGuichet(String guiNatureGuichet) {
		this.guiNatureGuichet = guiNatureGuichet;
	}

	/**
	 */
	public String getGuiNatureGuichet() {
		return this.guiNatureGuichet;
	}

	/**
	 */
	public void setGuiCodeSituation(Boolean guiCodeSituation) {
		this.guiCodeSituation = guiCodeSituation;
	}

	/**
	 */
	public Boolean getGuiCodeSituation() {
		return this.guiCodeSituation;
	}

	/**
	 */
	public void setGuiTiers(Integer guiTiers) {
		this.guiTiers = guiTiers;
	}

	/**
	 */
	public Integer getGuiTiers() {
		return this.guiTiers;
	}

	/**
	 */
	public void setEtablissementsBancaires(EtablissementsBancaires etablissementsBancaires) {
		this.etablissementsBancaires = etablissementsBancaires;
	}

	/**
	 */
	public EtablissementsBancaires getEtablissementsBancaires() {
		return etablissementsBancaires;
	}

	/**
	 */
	public Guichets() {
	}

	/**
	 * Copies the contents of the specified bean into this bean.
	 *
	 */
	public void copy(Guichets that) {
		setGuiEtablissement(that.getGuiEtablissement());
		setGuiGuichet(that.getGuiGuichet());
		setGuiPays(that.getGuiPays());
		setGuiDomiciliation(that.getGuiDomiciliation());
		setGuiAdressePrelevement(that.getGuiAdressePrelevement());
		setGuiContactPrelevement(that.getGuiContactPrelevement());
		setGuiChronoTrace(that.getGuiChronoTrace());
		setGuiNomGuichet(that.getGuiNomGuichet());
		setGuiCodeNouvEtablissement(that.getGuiCodeNouvEtablissement());
		setGuiNouvGuichet(that.getGuiNouvGuichet());
		setGuiLocaliteCompensation1(that.getGuiLocaliteCompensation1());
		setGuiLocaliteCompensation2(that.getGuiLocaliteCompensation2());
		setGuiDebutValidite(that.getGuiDebutValidite());
		setGuiFinValidite(that.getGuiFinValidite());
		setGuiDisparition(that.getGuiDisparition());
		setGuiNatureGuichet(that.getGuiNatureGuichet());
		setGuiCodeSituation(that.getGuiCodeSituation());
		setGuiTiers(that.getGuiTiers());
		setEtablissementsBancaires(that.getEtablissementsBancaires());
	}

	/**
	 * Returns a textual representation of a bean.
	 *
	 */
	public String toString() {

		StringBuilder buffer = new StringBuilder();

		buffer.append("guiEtablissement=[").append(guiEtablissement).append("] ");
		buffer.append("guiGuichet=[").append(guiGuichet).append("] ");
		buffer.append("guiPays=[").append(guiPays).append("] ");
		buffer.append("guiDomiciliation=[").append(guiDomiciliation).append("] ");
		buffer.append("guiAdressePrelevement=[").append(guiAdressePrelevement).append("] ");
		buffer.append("guiContactPrelevement=[").append(guiContactPrelevement).append("] ");
		buffer.append("guiChronoTrace=[").append(guiChronoTrace).append("] ");
		buffer.append("guiNomGuichet=[").append(guiNomGuichet).append("] ");
		buffer.append("guiCodeNouvEtablissement=[").append(guiCodeNouvEtablissement).append("] ");
		buffer.append("guiNouvGuichet=[").append(guiNouvGuichet).append("] ");
		buffer.append("guiLocaliteCompensation1=[").append(guiLocaliteCompensation1).append("] ");
		buffer.append("guiLocaliteCompensation2=[").append(guiLocaliteCompensation2).append("] ");
		buffer.append("guiDebutValidite=[").append(guiDebutValidite).append("] ");
		buffer.append("guiFinValidite=[").append(guiFinValidite).append("] ");
		buffer.append("guiDisparition=[").append(guiDisparition).append("] ");
		buffer.append("guiNatureGuichet=[").append(guiNatureGuichet).append("] ");
		buffer.append("guiCodeSituation=[").append(guiCodeSituation).append("] ");
		buffer.append("guiTiers=[").append(guiTiers).append("] ");

		return buffer.toString();
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((guiEtablissement == null) ? 0 : guiEtablissement.hashCode()));
		result = (int) (prime * result + ((guiGuichet == null) ? 0 : guiGuichet.hashCode()));
		result = (int) (prime * result + ((guiPays == null) ? 0 : guiPays.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof Guichets))
			return false;
		Guichets equalCheck = (Guichets) obj;
		if ((guiEtablissement == null && equalCheck.guiEtablissement != null) || (guiEtablissement != null && equalCheck.guiEtablissement == null))
			return false;
		if (guiEtablissement != null && !guiEtablissement.equals(equalCheck.guiEtablissement))
			return false;
		if ((guiGuichet == null && equalCheck.guiGuichet != null) || (guiGuichet != null && equalCheck.guiGuichet == null))
			return false;
		if (guiGuichet != null && !guiGuichet.equals(equalCheck.guiGuichet))
			return false;
		if ((guiPays == null && equalCheck.guiPays != null) || (guiPays != null && equalCheck.guiPays == null))
			return false;
		if (guiPays != null && !guiPays.equals(equalCheck.guiPays))
			return false;
		return true;
	}
}
